
**************************************************************************************
************************************************************************************** 
****                                                                              ****
**** The following STATA program files were used for the analysis in:             ****
****                                                                              ****
**** Reputation Management and Administrative Reorganization: How                 ****
**** Different Media Reputation Dimensions Matter for Agency Termination          ****
**** Please kindly acknowledge us when publishing your work using this data       ****
**** source--be it in whole or in part.                                           ****
****                                                                              ****
**** Contact us if you have any questions concerning either the                   ****
**** data  structure or programming.                                              ****
****                                                                              ****
**************************************************************************************
**************************************************************************************




use medreptables.dta,clear


******lable variables


label variable reformteammember "Small leading team"
label variable turnover "Head turnover"
label variable log_staff "Size (log)"
label variable newestaff "Size"
label variable age "Age"
label variable age2 "Age (squared)"
label variable create "NPC approval"
label variable level "Ministry-level"
label variable economy "Economic function"
label variable high  "High prestige"
label variable medium "Medium prestige"
label variable low "Low prestige"
label variable surplus  "Government surplus"
label variable governspending  "Government spending"
label variable log_spend  "Government spending(log)"

label variable totalmediagb "Totalmedia gb"
label variable pergb "Performative reputation gb"
label variable morgb  "Moral reputation gb"
label variable progb "Procedural reputation gb"
label variable techgb "Technical reputation gb"


label variable tmediagbpc "Totalmedia pcgb"
label variable pergbpc "Performativereputation pcgb"
label variable morgbpc "Moral reputation pcgb"
label variable progbpc "Procedural reputation pcgb"
label variable techgbpc "Technical reputation pcgb"


label variable logtmedgbpc "Totalmediapcgb(log)"
label variable logpergbpc "Performativepcgb(log)"
label variable logmorgbpc  "Moralperpcgb(log)"
label variable logprogbpc "Proceduralpcgb(log)"
label variable logtechgbpc "Technicalpcgb(log)"


label variable totalmedianb "Totalmedia nb"
label variable pernb "Performative reputation nb"
label variable mornb  "Moral reputation nb"
label variable pronb "Procedural reputation nb"
label variable technb "Technical reputation nb"


label variable tmedianbpc "Totalmedia pcnb"
label variable pernbpc "Performative reputation pcnb"
label variable mornbpc "Moral reputation pcnb"
label variable pronbpc "Procedural reputation pcnb"
label variable technbpc "Technical reputation pcnb"


label variable logtmednbpc "Totalmediapcnb(log)"
label variable logpernbpc "Performativepcnb(log)"
label variable logmornbpc  "Moralperpcnb(log)"
label variable logpronbpc "Proceduralpcnb(log)"
label variable logtechnbpc "Technicalpcnb(log)"


label variable totalmediarf "Totalmedia rf"
label variable perrf "Performative reputation rf"
label variable morrf  "Moral reputation rf"
label variable prorf "Procedural reputation rf"
label variable techrf "Technical reputation rf"


label variable tmediarfpc "Totalmedia pcrf"
label variable perrfpc "Performative reputation pcrf"
label variable morrfpc "Moral reputation pcrf"
label variable prorfpc "Procedural reputation pcrf"
label variable techrfpc "Technical reputation pcrf"


label variable logtmedrfpc "Totalmediapcrf(log)"
label variable logperrfpc "Performativepcrf(log)"
label variable logmorrfpc  "Moralperpcrf(log)"
label variable logprorfpc "Proceduralpcrf(log)"
label variable logtechrfpc "Technicalpcrf(log)"


label variable macroeconomic "Macroeconomic and Monetary Agencies"
label variable specieconomic "Specialized Economic Agencies"
label variable edusciencesocialresource "Education, Technology, Culture, Social Security, Resources, and Environment Agencies"
label variable admindepartment  "Administration and General Affairs Agencies"

*****Table 1-4, A5-A29

****Table1. baseline descriptive statistics of key variables

eststo clear
estpost sum tmediagbpc pergbpc morgbpc progbpc techgbpc  logtmedgbpc logpergbpc logmorgbpc logprogbpc logtechgbpc newestaff log_staff  create level reformteammember turnover age age2 governspending log_spend economy high medium low 
esttab  using Table1allsampletablegb.rtf, ///
cells("count(fmt(0)) mean(fmt(3)) sd(fmt(3)) min(fmt(3)) max(fmt(3))")  ///
label nonumber noobs nomtitle ///
title({\b Table 1.} {\i Variable Definition And Descriptive Statistics})  /// 
replace 


****Table2. The random-effects logit model estimates,total media and four reputation, percentage, Based on Multiple Algorithm, with log

eststo clear 
eststo: quietly xtlogit  death  logtmedgbpc log_staff level create reformteammember turnover age age2  economy high medium log_spend,re or vce(cluster agencyid)
eststo: quietly xtlogit  death logpergbpc logmorgbpc logprogbpc logtechgbpc log_staff level create reformteammember turnover age age2  economy high medium log_spend,re or vce(cluster agencyid)
eststo: quietly xtlogit  death logpernbpc logmornbpc logpronbpc logtechnbpc log_staff level create reformteammember turnover age age2  economy high medium log_spend,re or vce(cluster agencyid)
eststo: quietly xtlogit  death logperrfpc logmorrfpc logprorfpc logtechrfpc log_staff level create reformteammember turnover age age2  economy high medium log_spend,re or vce(cluster agencyid)

esttab using Table2allsampletablepcnblog.rtf,replace label nocon p aic bic scalar(ll chi2)title({\b Table 2.} {\i Event History Analysis of Central Agency Termination Based on Multiple Algorithms}) /// 
mtitles("Baseline" "GBDT" "NB""RF") compress nogap starlevels(* 0.05 ** 0.01 *** 0.001) 


****Table 3. Piecewise Constant Exponential Model of Central Agency Termination with Total Media Salience

preserve

rename reformteammember ref
rename turnover turn
rename log_staff staf
rename age age
rename age2 a2ge
rename create cre
rename level lev
rename economy eco
rename log_spend spd
rename high hi 
rename medium med
rename  logtmedgbpc  lgbtmdpc



stset year, failure(death) id(agencyid)	 
stpiece, tp(1966 1978) tv(lgbtmdpc staf lev cre ref turn age a2ge  eco hi med spd) cluster(agencyid) robust nolog 
est store PCE_Model1																				 
esttab PCE_Model1,replace p aic bic scalar(ll chi2)			
esttab PCE_Model1 using Table3PCE_Modelltmd19661978all.rtf,replace p aic bic scalar(ll chi2)								 



********Table4. Piecewise Constant Exponential Model of Central Agency Termination with Four Reputation Types Based on Different Algorithms(Log Form)

rename logpergbpc gbperpc
rename  logmorgbpc  gbmorpc
rename  logprogbpc gbprocpc
rename  logtechgbpc gbtechpc


stset year, failure(death) id(agencyid)	 
stpiece, tp(1966 1978) tv(gbperpc gbmorpc gbprocpc gbtechpc staf lev cre ref turn age a2ge  eco hi med spd) cluster(agencyid) robust nolog 
est store PCE_Model2																			 
esttab PCE_Model2,replace p aic bic scalar(ll chi2)
esttab PCE_Model2 using Table4PCE_Modellfourep19661978gb.rtf,replace p aic bic scalar(ll chi2)								 


 
rename logpernbpc nbperpc
rename  logmornbpc  nbmorpc
rename  logpronbpc nbprocpc
rename  logtechnbpc nbtechpc

stset year, failure(death) id(agencyid) 
stpiece, tp(1966 1978) tv(nbperpc nbmorpc nbprocpc nbtechpc staf lev cre ref turn age a2ge  eco hi med spd) cluster(agencyid) robust nolog 
est store PCE_Model2																			 
esttab PCE_Model2,replace p aic bic scalar(ll chi2)
esttab PCE_Model2 using Table4PCE_Modellfourep19661978nb.rtf,replace p aic bic scalar(ll chi2)							 

 
rename logperrfpc rfperpc
rename  logmorrfpc  rfmorpc
rename  logprorfpc rfprocpc
rename  logtechrfpc rftechpc


stset year, failure(death) id(agencyid)	 
stpiece, tp(1966 1978) tv(rfperpc rfmorpc rfprocpc rftechpc staf lev cre ref turn age a2ge  eco hi med spd) cluster(agencyid) robust nolog 
est store PCE_Model2																				 
esttab PCE_Model2,replace p aic bic scalar(ll chi2)
esttab PCE_Model2 using Table4PCE_Modellfourep19661978rf.rtf,replace p aic bic scalar(ll chi2)							 

restore


*******Table A5. Event History Analysis with Different Models Based on the GBDT Algorithm

eststo clear 
eststo: quietly xtlogit  death logtmedgbpc  log_staff level create reformteammember turnover age age2  economy high medium log_spend,re or vce(cluster agencyid)
eststo: quietly xtlogit  death logpergbpc logmorgbpc logprogbpc logtechgbpc log_staff level create reformteammember turnover age age2  economy high medium log_spend,re or vce(cluster agencyid)
stset year, failure(death) id(agencyid)
eststo: quietly stcox logtmedgbpc  log_staff level create reformteammember turnover age age2  economy high medium log_spend, vce(cluster agencyid)
eststo: quietly stcox logpergbpc logmorgbpc logprogbpc logtechgbpc log_staff level create reformteammember turnover age age2  economy high medium log_spend, vce(cluster agencyid)
 btscs death year agencyid, g(miduration) nspline(3)
eststo: quietly logit  death logtmedgbpc log_staff level create reformteammember turnover age age2  economy high medium log_spend  miduration _spline1 _spline2 _spline3,or vce(cluster agencyid)
eststo: quietly logit  death logpergbpc logmorgbpc logprogbpc logtechgbpc log_staff level create reformteammember turnover age age2  economy high medium log_spend  miduration _spline1 _spline2 _spline3,or vce(cluster agencyid)
esttab using TableA5allsampletablenewpcgb.rtf,replace label nocon se aic bic scalar(ll chi2)title({\b TABLE A5.} {\i  Event History Analysis with Different Models Based on the GBDT Algorithm}) /// 
mtitles("logitgb" "logitgb""coxgb" "coxgb""splinegb" "splinegb") compress nogap starlevels(* 0.10 ** 0.05 *** 0.01) ///
order(logtmedgbpc logpergbpc logmorgbpc logprogbpc logtechgbpc log_staff level create reformteammember turnover age age2  economy high medium log_spend) 



********Table A8. Event History Analysis with Different Models Based on the NB Algorithm


eststo clear 
eststo: quietly xtlogit  death logtmednbpc  log_staff level create reformteammember turnover age age2  economy high medium log_spend,re or vce(cluster agencyid)
eststo: quietly xtlogit  death logpernbpc logmornbpc logpronbpc logtechnbpc log_staff level create reformteammember turnover age age2  economy high medium log_spend,re or vce(cluster agencyid)
stset year, failure(death) id(agencyid)
eststo: quietly stcox logtmednbpc  log_staff level create reformteammember turnover age age2  economy high medium log_spend, vce(cluster agencyid)
eststo: quietly stcox logpernbpc logmornbpc logpronbpc logtechnbpc log_staff level create reformteammember turnover age age2  economy high medium log_spend, vce(cluster agencyid)
eststo: quietly logit  death logtmednbpc log_staff level create reformteammember turnover age age2  economy high medium log_spend  miduration _spline1 _spline2 _spline3,or vce(cluster agencyid)
eststo: quietly logit  death logpernbpc logmornbpc logpronbpc logtechnbpc log_staff level create reformteammember turnover age age2  economy high medium log_spend  miduration _spline1 _spline2 _spline3,or vce(cluster agencyid)
esttab using TableA8allsampletablenewpcnb.rtf,replace label nocon se aic bic scalar(ll chi2)title({\b TABLE A8.} {\i Event History Analysis with Different Models Based on the NB Algorithm}) /// 
mtitles("logitnb" "logitnb""coxnb" "coxnb""splinenb" "splinenb") compress nogap starlevels(* 0.10 ** 0.05 *** 0.01) ///
order(logtmednbpc logpernbpc logmornbpc logpronbpc logtechnbpc log_staff level create reformteammember turnover age age2  economy high medium log_spend) 



**********Table A11. Event History Analysis with Different Models Based on the RF Algorithm


eststo clear 
eststo: quietly xtlogit  death logtmedrfpc  log_staff level create reformteammember turnover age age2  economy high medium log_spend,re or vce(cluster agencyid)
eststo: quietly xtlogit  death logperrfpc logmorrfpc logprorfpc logtechrfpc log_staff level create reformteammember turnover age age2  economy high medium log_spend,re or vce(cluster agencyid)
stset year, failure(death) id(agencyid)
eststo: quietly stcox logtmedrfpc  log_staff level create reformteammember turnover age age2  economy high medium log_spend, vce(cluster agencyid)
eststo: quietly stcox logperrfpc logmorrfpc logprorfpc logtechrfpc log_staff level create reformteammember turnover age age2  economy high medium log_spend, vce(cluster agencyid)
eststo: quietly logit  death logtmedrfpc log_staff level create reformteammember turnover age age2  economy high medium log_spend  miduration _spline1 _spline2 _spline3,or vce(cluster agencyid)
eststo: quietly logit  death logperrfpc logmorrfpc logprorfpc logtechrfpc log_staff level create reformteammember turnover age age2  economy high medium log_spend  miduration _spline1 _spline2 _spline3,or vce(cluster agencyid)
esttab using TableA11allsampletablenewpcrf.rtf,replace label nocon se aic bic scalar(ll chi2)title({\b TABLE A11.} {\i Event History Analysis of Central Agency Termination With Different Models Based on RF Algorithm}) /// 
mtitles("logitrf" "logitrf""coxrf" "coxrf""splinerf" "splinerf") compress nogap starlevels(* 0.10 ** 0.05 *** 0.01) ///
order(logtmedrfpc logperrfpc logmorrfpc logprorfpc logtechrfpc log_staff level create reformteammember turnover age age2  economy high medium log_spend) 



****************Table A12. Event History Analysis of Central Agency Termination Based on Multiple Algorithms with Different Agency Functions

eststo clear 
eststo: quietly xtlogit  death  logtmedgbpc log_staff level create reformteammember turnover age age2 specieconomic  edusciencesocialresource admindepartment high medium log_spend,re or vce(cluster agencyid)
eststo: quietly xtlogit  death logpergbpc logmorgbpc logprogbpc logtechgbpc log_staff level create reformteammember turnover age age2 specieconomic  edusciencesocialresource admindepartment high medium log_spend,re or vce(cluster agencyid)
eststo: quietly xtlogit  death logpernbpc logmornbpc logpronbpc logtechnbpc log_staff level create reformteammember turnover age age2  specieconomic  edusciencesocialresource admindepartment high medium log_spend,re or vce(cluster agencyid)
eststo: quietly xtlogit  death logperrfpc logmorrfpc logprorfpc logtechrfpc log_staff level create reformteammember turnover age age2  specieconomic  edusciencesocialresource admindepartment high medium log_spend,re or vce(cluster agencyid)

esttab using TableA12allsampletablepcbaselinelog.rtf,replace label nocon se aic bic scalar(ll chi2)title({\b Table A12.} {\i Event History Analysis of Central Agency Termination Based on Multiple Algorithms with Different Function}) /// 
mtitles("Baseline" "GBDT" "NB""RF") compress nogap starlevels(* 0.10 ** 0.05 *** 0.01) 

*****Table A14. Interacting Reputational Variables with Macroeconomic and Monetary Agencies Based on the GBDT Algorithm


eststo clear 
eststo: quietly xtlogit  death c.logpergbpc##i.macroeconomic   logmorgbpc logprogbpc logtechgbpc log_staff level create reformteammember turnover age age2 high medium log_spend,re or vce(cluster agencyid)
eststo: quietly xtlogit  death logpergbpc c.logmorgbpc##i.macroeconomic   logprogbpc logtechgbpc log_staff level create reformteammember turnover age age2   high medium log_spend,re or vce(cluster agencyid)
eststo: quietly xtlogit  death logpergbpc logmorgbpc c.logprogbpc##i.macroeconomic   logtechgbpc log_staff level create reformteammember turnover age age2   high medium log_spend,re or vce(cluster agencyid)
eststo: quietly xtlogit  death logpergbpc logmorgbpc logprogbpc c.logtechgbpc##i.macroeconomic   log_staff level create reformteammember turnover age age2   high medium log_spend,re or vce(cluster agencyid)
esttab using TableA14allsamplemacroeconomicgbpc.rtf,replace label nocon se aic bic scalar(ll chi2)title({\b TABLE A14.} {\i Interacting Reputational Variables with Macroeconomic and Monetary Agencies Agencies Based on the GBDT Algorithm}) /// 
mtitles("Performative" "Moral""Procedural" "Technical") compress nogap starlevels(* 0.10 ** 0.05 *** 0.01) ///
order(logpergbpc logmorgbpc logprogbpc logtechgbpc log_staff level create reformteammember turnover age age2  high medium log_spend) 



*****Table A15. Interacting Reputational Variables with Specialized Economic Agencies Based on the GBDT Algorithm

eststo clear 
eststo: quietly xtlogit  death c.logpergbpc##i.specieconomic   logmorgbpc logprogbpc logtechgbpc log_staff level create reformteammember turnover age age2 high medium log_spend,re or vce(cluster agencyid)
eststo: quietly xtlogit  death logpergbpc c.logmorgbpc##i.specieconomic   logprogbpc logtechgbpc log_staff level create reformteammember turnover age age2   high medium log_spend,re or vce(cluster agencyid)
eststo: quietly xtlogit  death logpergbpc logmorgbpc c.logprogbpc##i.specieconomic   logtechgbpc log_staff level create reformteammember turnover age age2   high medium log_spend,re or vce(cluster agencyid)
eststo: quietly xtlogit  death logpergbpc logmorgbpc logprogbpc c.logtechgbpc##i.specieconomic   log_staff level create reformteammember turnover age age2   high medium log_spend,re or vce(cluster agencyid)
esttab using TableA15allsamplespecieconomicgb.rtf,replace label nocon se aic bic scalar(ll chi2)title({\b TABLE A15.} {\i Interacting Reputational Variables with Specialized Economic Agencies Based on the GBDT Algorithm}) /// 
mtitles("Performative" "Moral""Procedural" "Technical") compress nogap starlevels(* 0.10 ** 0.05 *** 0.01) ///
order(logpergbpc logmorgbpc logprogbpc logtechgbpc log_staff level create reformteammember turnover age age2  high medium log_spend) 



*****Table A16. Interacting Reputational Variables with Education, Technology, Culture, Social Security, Resources, and Environment Agencies Based on the GBDT Algorithm

eststo clear 
eststo: quietly xtlogit  death c.logpergbpc##i.edusciencesocialresource   logmorgbpc logprogbpc logtechgbpc log_staff level create reformteammember turnover age age2 high medium log_spend,re or vce(cluster agencyid)
eststo: quietly xtlogit  death logpergbpc c.logmorgbpc##i.edusciencesocialresource   logprogbpc logtechgbpc log_staff level create reformteammember turnover age age2   high medium log_spend,re or vce(cluster agencyid)
eststo: quietly xtlogit  death logpergbpc logmorgbpc c.logprogbpc##i.edusciencesocialresource   logtechgbpc log_staff level create reformteammember turnover age age2   high medium log_spend,re or vce(cluster agencyid)
eststo: quietly xtlogit  death logpergbpc logmorgbpc logprogbpc c.logtechgbpc##i.edusciencesocialresource   log_staff level create reformteammember turnover age age2   high medium log_spend,re or vce(cluster agencyid)

esttab using TableA16allsampleedusciencesocialresourcegb.rtf,replace label nocon se aic bic scalar(ll chi2)title({\b TABLE A16.} {\i Interacting Reputational Variables with Education, Technology, Culture, Social Security, Resources, and Environment Agencies Based on the GBDT Algorithm}) /// 
mtitles("Performative" "Moral""Procedural" "Technical") compress nogap starlevels(* 0.10 ** 0.05 *** 0.01) /// 
order(logpergbpc logmorgbpc logprogbpc logtechgbpc log_staff level create reformteammember turnover age age2  high medium log_spend) 

*****Table A17. Interacting Reputational Variables with Administration and General Affairs Agencies Based on the GBDT Algorithm

eststo clear 
eststo: quietly xtlogit  death c.logpergbpc##i.admindepartment   logmorgbpc logprogbpc logtechgbpc log_staff level create reformteammember turnover age age2 high medium log_spend,re or vce(cluster agencyid)
eststo: quietly xtlogit  death logpergbpc c.logmorgbpc##i.admindepartment   logprogbpc logtechgbpc log_staff level create reformteammember turnover age age2   high medium log_spend,re or vce(cluster agencyid)
eststo: quietly xtlogit  death logpergbpc logmorgbpc c.logprogbpc##i.admindepartment   logtechgbpc log_staff level create reformteammember turnover age age2   high medium log_spend,re or vce(cluster agencyid)
eststo: quietly xtlogit  death logpergbpc logmorgbpc logprogbpc c.logtechgbpc##i.admindepartment   log_staff level create reformteammember turnover age age2   high medium log_spend,re or vce(cluster agencyid)

esttab using TableA17allsampleadmindepartmentgb.rtf,replace label nocon se aic bic scalar(ll chi2)title({\b TABLE A17.} {\i Interacting Reputational Variables with Administration and General Affairs Agencies Based on the GBDT Algorithm}) /// 
mtitles("Performative" "Moral""Procedural" "Technical") compress nogap starlevels(* 0.10 ** 0.05 *** 0.01) /// 
order(logpergbpc logmorgbpc logprogbpc logtechgbpc log_staff level create reformteammember turnover age age2  high medium log_spend) 



*****Table A18. Interacting Reputational Variables with Macroeconomic and Monetary Agencies Based on the NB Algorithm


eststo clear 
eststo: quietly xtlogit  death c.logpernbpc##i.macroeconomic   logmornbpc logpronbpc logtechnbpc log_staff level create reformteammember turnover age age2 high medium log_spend,re or vce(cluster agencyid)
eststo: quietly xtlogit  death logpernbpc c.logmornbpc##i.macroeconomic   logpronbpc logtechnbpc log_staff level create reformteammember turnover age age2   high medium log_spend,re or vce(cluster agencyid)
eststo: quietly xtlogit  death logpernbpc logmornbpc c.logpronbpc##i.macroeconomic   logtechnbpc log_staff level create reformteammember turnover age age2   high medium log_spend,re or vce(cluster agencyid)
eststo: quietly xtlogit  death logpernbpc logmornbpc logpronbpc c.logtechnbpc##i.macroeconomic   log_staff level create reformteammember turnover age age2   high medium log_spend,re or vce(cluster agencyid)
esttab using TableA18allsamplemacroeconomicnbpc.rtf,replace label nocon se aic bic scalar(ll chi2)title({\TABLE A18.} {\i Interacting Reputational Variables with Macroeconomic and Monetary Agencies Based on the NB Algorithm}) /// 
mtitles("Performative" "Moral""Procedural" "Technical") compress nogap starlevels(* 0.10 ** 0.05 *** 0.01) ///
order(logpernbpc logmornbpc logpronbpc logtechnbpc log_staff level create reformteammember turnover age age2  high medium log_spend) 



******Table A19. Interacting Reputational Variables with Specialized Economic Agencies Based on the NB Algorithm
eststo clear 
eststo: quietly xtlogit  death c.logpernbpc##i.specieconomic   logmornbpc logpronbpc logtechnbpc log_staff level create reformteammember turnover age age2 high medium log_spend,re or vce(cluster agencyid)
eststo: quietly xtlogit  death logpernbpc c.logmornbpc##i.specieconomic   logpronbpc logtechnbpc log_staff level create reformteammember turnover age age2   high medium log_spend,re or vce(cluster agencyid)
eststo: quietly xtlogit  death logpernbpc logmornbpc c.logpronbpc##i.specieconomic   logtechnbpc log_staff level create reformteammember turnover age age2   high medium log_spend,re or vce(cluster agencyid)
eststo: quietly xtlogit  death logpernbpc logmornbpc logpronbpc c.logtechnbpc##i.specieconomic   log_staff level create reformteammember turnover age age2   high medium log_spend,re or vce(cluster agencyid)
esttab using TableA19allsamplespecieconomicnb.rtf,replace label nocon se aic bic scalar(ll chi2)title({\b TABLE A19.} {\i Interacting Reputational Variables with Specialized Economic Agencies Based on the NB Algorithm}) /// 
mtitles("Performative" "Moral""Procedural" "Technical") compress nogap starlevels(* 0.10 ** 0.05 *** 0.01) ///
order(logpernbpc logmornbpc logpronbpc logtechnbpc log_staff level create reformteammember turnover age age2  high medium log_spend) 


******Table A20. Interacting Reputational Variables with Education, Technology, Culture, Social Security, Resources, and Environment Agencies Based on the NB Algorithm
eststo clear 
eststo: quietly xtlogit  death c.logpernbpc##i.edusciencesocialresource   logmornbpc logpronbpc logtechnbpc log_staff level create reformteammember turnover age age2 high medium log_spend,re or vce(cluster agencyid)
eststo: quietly xtlogit  death logpernbpc c.logmornbpc##i.edusciencesocialresource   logpronbpc logtechnbpc log_staff level create reformteammember turnover age age2   high medium log_spend,re or vce(cluster agencyid)
eststo: quietly xtlogit  death logpernbpc logmornbpc c.logpronbpc##i.edusciencesocialresource   logtechnbpc log_staff level create reformteammember turnover age age2   high medium log_spend,re or vce(cluster agencyid)
eststo: quietly xtlogit  death logpernbpc logmornbpc logpronbpc c.logtechnbpc##i.edusciencesocialresource   log_staff level create reformteammember turnover age age2   high medium log_spend,re or vce(cluster agencyid)

esttab using TableA20allsampleedusciencesocialresourcenb.rtf,replace label nocon se aic bic scalar(ll chi2)title({\b TABLE A20.} {\i Interacting Reputational Variables with Education, Technology, Culture, Social Security, Resources, and Environment Agencies Based on the NB Algorithm}) /// 
mtitles("Performative" "Moral""Procedural" "Technical") compress nogap starlevels(* 0.10 ** 0.05 *** 0.01) /// 
order(logpernbpc logmornbpc logpronbpc logtechnbpc log_staff level create reformteammember turnover age age2  high medium log_spend) 


*******Table A21. Interacting Reputational Variables with Administration and General Affairs Agencies Based on the NB algorithm

eststo clear 
eststo: quietly xtlogit  death c.logpernbpc##i.admindepartment   logmornbpc logpronbpc logtechnbpc log_staff level create reformteammember turnover age age2 high medium log_spend,re or vce(cluster agencyid)
eststo: quietly xtlogit  death logpernbpc c.logmornbpc##i.admindepartment   logpronbpc logtechnbpc log_staff level create reformteammember turnover age age2   high medium log_spend,re or vce(cluster agencyid)
eststo: quietly xtlogit  death logpernbpc logmornbpc c.logpronbpc##i.admindepartment   logtechnbpc log_staff level create reformteammember turnover age age2   high medium log_spend,re or vce(cluster agencyid)
eststo: quietly xtlogit  death logpernbpc logmornbpc logpronbpc c.logtechnbpc##i.admindepartment   log_staff level create reformteammember turnover age age2   high medium log_spend,re or vce(cluster agencyid)

esttab using TableA21allsampleadmindepartmentnb.rtf,replace label nocon se aic bic scalar(ll chi2)title({\b TABLE A21.} {\i Interacting Reputational Variables with Administration and General Affairs Agencies Based on the NB algorithm}) /// 
mtitles("Performative" "Moral""Procedural" "Technical") compress nogap starlevels(* 0.10 ** 0.05 *** 0.01) /// 
order(logpernbpc logmornbpc logpronbpc logtechnbpc log_staff level create reformteammember turnover age age2  high medium log_spend) 



*********Table A22. Interacting Reputational Variables with Macroeconomic and Monetary Agencies Based on the RF Algorithm


eststo clear 
eststo: quietly xtlogit  death c.logperrfpc##i.macroeconomic   logmorrfpc logprorfpc logtechrfpc log_staff level create reformteammember turnover age age2 high medium log_spend,re or vce(cluster agencyid)
eststo: quietly xtlogit  death logperrfpc c.logmorrfpc##i.macroeconomic   logprorfpc logtechrfpc log_staff level create reformteammember turnover age age2   high medium log_spend,re or vce(cluster agencyid)
eststo: quietly xtlogit  death logperrfpc logmorrfpc c.logprorfpc##i.macroeconomic   logtechrfpc log_staff level create reformteammember turnover age age2   high medium log_spend,re or vce(cluster agencyid)
eststo: quietly xtlogit  death logperrfpc logmorrfpc logprorfpc c.logtechrfpc##i.macroeconomic   log_staff level create reformteammember turnover age age2   high medium log_spend,re or vce(cluster agencyid)
esttab using TableA22allsamplemacroeconomicrfpc.rtf,replace label nocon se aic bic scalar(ll chi2)title({\b TABLE A22.} {\i Interacting Reputational Variables with Macroeconomic and Monetary Agencies Based on RF Algorithm}) /// 
mtitles("Performative" "Moral""Procedural" "Technical") compress nogap starlevels(* 0.10 ** 0.05 *** 0.01) ///
order(logperrfpc logmorrfpc logprorfpc logtechrfpc log_staff level create reformteammember turnover age age2  high medium log_spend) 


******Table A23. Interacting Reputational Variables with Specialized Economic Agencies Based on the RF Algorithm

eststo clear 
eststo: quietly xtlogit  death c.logperrfpc##i.specieconomic   logmorrfpc logprorfpc logtechrfpc log_staff level create reformteammember turnover age age2 high medium log_spend,re or vce(cluster agencyid)
eststo: quietly xtlogit  death logperrfpc c.logmorrfpc##i.specieconomic   logprorfpc logtechrfpc log_staff level create reformteammember turnover age age2   high medium log_spend,re or vce(cluster agencyid)
eststo: quietly xtlogit  death logperrfpc logmorrfpc c.logprorfpc##i.specieconomic   logtechrfpc log_staff level create reformteammember turnover age age2   high medium log_spend,re or vce(cluster agencyid)
eststo: quietly xtlogit  death logperrfpc logmorrfpc logprorfpc c.logtechrfpc##i.specieconomic   log_staff level create reformteammember turnover age age2   high medium log_spend,re or vce(cluster agencyid)
esttab using TableA23allsamplespecieconomicrf.rtf,replace label nocon se aic bic scalar(ll chi2)title({\b TABLE A23.} {\i Interacting Reputational Variables with Specialized Economic Agencies Based on RF Algorithm}) /// 
mtitles("Performative" "Moral""Procedural" "Technical") compress nogap starlevels(* 0.10 ** 0.05 *** 0.01) ///
order(logperrfpc logmorrfpc logprorfpc logtechrfpc log_staff level create reformteammember turnover age age2  high medium log_spend) 


*******Table A24. Interacting Reputational Variables with Education, Technology, Culture, Social Security, Resources, and Environment Agencies Based on the RF Algorithm

eststo clear 
eststo: quietly xtlogit  death c.logperrfpc##i.edusciencesocialresource   logmorrfpc logprorfpc logtechrfpc log_staff level create reformteammember turnover age age2 high medium log_spend,re or vce(cluster agencyid)
eststo: quietly xtlogit  death logperrfpc c.logmorrfpc##i.edusciencesocialresource   logprorfpc logtechrfpc log_staff level create reformteammember turnover age age2   high medium log_spend,re or vce(cluster agencyid)
eststo: quietly xtlogit  death logperrfpc logmorrfpc c.logprorfpc##i.edusciencesocialresource   logtechrfpc log_staff level create reformteammember turnover age age2   high medium log_spend,re or vce(cluster agencyid)
eststo: quietly xtlogit  death logperrfpc logmorrfpc logprorfpc c.logtechrfpc##i.edusciencesocialresource   log_staff level create reformteammember turnover age age2   high medium log_spend,re or vce(cluster agencyid)

esttab using TableA24allsampleedusciencesocialresourcerf.rtf,replace label nocon se aic bic scalar(ll chi2)title({\b TABLE A24.} {\i Interacting Reputational Variables with Education, Technology, Culture, Social Security, Resources, and Environment Agencies Based on RF Algorithm}) /// 
mtitles("Performative" "Moral""Procedural" "Technical") compress nogap starlevels(* 0.10 ** 0.05 *** 0.01) /// 
order(logperrfpc logmorrfpc logprorfpc logtechrfpc log_staff level create reformteammember turnover age age2  high medium log_spend) 


**********Table A25. Interacting Reputational Variables with Administration and General Affairs Agencies Based on the RF Algorithm

eststo clear 
eststo: quietly xtlogit  death c.logperrfpc##i.admindepartment   logmorrfpc logprorfpc logtechrfpc log_staff level create reformteammember turnover age age2 high medium log_spend,re or vce(cluster agencyid)
eststo: quietly xtlogit  death logperrfpc c.logmorrfpc##i.admindepartment   logprorfpc logtechrfpc log_staff level create reformteammember turnover age age2   high medium log_spend,re or vce(cluster agencyid)
eststo: quietly xtlogit  death logperrfpc logmorrfpc c.logprorfpc##i.admindepartment   logtechrfpc log_staff level create reformteammember turnover age age2   high medium log_spend,re or vce(cluster agencyid)
eststo: quietly xtlogit  death logperrfpc logmorrfpc logprorfpc c.logtechrfpc##i.admindepartment   log_staff level create reformteammember turnover age age2   high medium log_spend,re or vce(cluster agencyid)

esttab using TableA25allsampleadmindepartmentrf.rtf,replace label nocon se aic bic scalar(ll chi2)title({\b TABLE A25.} {\i Interacting Reputational Variables with Administration and General Affairs Agencies Based on RF Algorithm}) /// 
mtitles("Performative" "Moral""Procedural" "Technical") compress nogap starlevels(* 0.10 ** 0.05 *** 0.01) /// 
order(logperrfpc logmorrfpc logprorfpc logtechrfpc log_staff level create reformteammember turnover age age2  high medium log_spend) 


******Table A26. The Descriptive Statistics of Reputation Variables and Agency Type

 eststo clear
estpost sum totalmediagb pergb morgb progb techgb pernb mornb pronb technb perrf morrf prorf techrf tmediagbpc logtmedgbpc  pergbpc morgbpc progbpc techgbpc  logpergbpc logmorgbpc logprogbpc logtechgbpc pernbpc mornbpc pronbpc technbpc   logpernbpc logmornbpc logpronbpc logtechnbpc  perrfpc morrfpc prorfpc techrfpc logperrfpc logmorrfpc logprorfpc logtechrfpc macroeconomic specieconomic  edusciencesocialresource  admindepartment 
esttab  using TableA26allsampletableallrepvaragencytype.rtf, ///
cells("count(fmt(0)) mean(fmt(3)) sd(fmt(3)) min(fmt(3)) max(fmt(3))")  ///
label nonumber noobs nomtitle ///
title({\b Table A26.} {\i The Descriptive Statistics of Reputation Variables and Agency Type})  /// 
replace 




*******Table A27. Event History Analysis of Central Agency Termination Based on Multiple Algorithms Without Log Form

eststo clear 
eststo: quietly xtlogit  death  totalmediagb  log_staff level create reformteammember turnover age age2  economy high medium log_spend,re or vce(cluster agencyid)
eststo: quietly xtlogit  death pergbpc morgbpc progbpc techgbpc log_staff level create reformteammember turnover age age2  economy high medium log_spend,re or vce(cluster agencyid)
eststo: quietly xtlogit  death pernbpc mornbpc pronbpc technbpc log_staff level create reformteammember turnover age age2  economy high medium log_spend,re or vce(cluster agencyid)
eststo: quietly xtlogit  death perrfpc morrfpc prorfpc techrfpc log_staff level create reformteammember turnover age age2  economy high medium log_spend,re or vce(cluster agencyid)

esttab using TableA27allsampletablepcnbwithoutlog.rtf,replace label nocon se aic bic scalar(ll chi2)title({\b Table A27.} {\i Event History Analysis of Central Agency Termination Based on Multiple Algorithms Without Log Form}) /// 
mtitles("Baseline" "GBDT" "NB""RF") compress nogap starlevels(* 0.10 ** 0.05 *** 0.01) 



*******Table A28.Piecewise Constant Exponential Model of Central Agency Termination with Total Media Salience Without Log Form


rename reformteammember ref
rename turnover turn
rename log_staff staf
rename age age
rename age2 a2ge
rename create cre
rename level lev
rename economy eco
rename log_spend spd
rename high hi 
rename medium med
rename  tmediagbpc  tmdpc



stset year, failure(death) id(agencyid)	 
stpiece, tp(1966 1978) tv(tmdpc staf lev cre ref turn age a2ge  eco hi med spd) cluster(agencyid) robust nolog 
est store PCE_Model11																				 
esttab PCE_Model11,replace se aic bic scalar(ll chi2)			
esttab PCE_Model11 using TableA28PCE_Modeltmdpc19661978allwithoutlog.rtf,replace se aic bic scalar(ll chi2)								 



******Table A29. Piecewise Constant Exponential Model of Central Agency Termination with Four Reputation Types Based on Multiple Algorithms without Log Form


rename pergbpc gbperpc
rename  morgbpc  gbmorpc
rename  progbpc gbprocpc
rename  techgbpc gbtechpc


stset year, failure(death) id(agencyid)	 
stpiece, tp(1966 1978) tv(gbperpc gbmorpc gbprocpc gbtechpc staf lev cre ref turn age a2ge  eco hi med spd) cluster(agencyid) robust nolog 
est store PCE_Model2withoulog																		 
esttab PCE_Model2withoulog,replace se aic bic scalar(ll chi2)
esttab PCE_Model2withoulog using TableA29PCE_Modellfourep19661978gbwithoutlog.rtf,replace se aic bic scalar(ll chi2)								 



rename pernbpc nbperpc
rename mornbpc  nbmorpc
rename pronbpc nbprocpc
rename technbpc nbtechpc

stset year, failure(death) id(agencyid)	 
stpiece, tp(1966 1978) tv(nbperpc nbmorpc nbprocpc nbtechpc staf lev cre ref turn age a2ge  eco hi med spd) cluster(agencyid) robust nolog 
est store PCE_Model2																				 
esttab PCE_Model2,replace se aic bic scalar(ll chi2)
esttab PCE_Model2 using TableA29PCE_Modellfourep19661978nbwithoutlog.rtf,replace se aic bic scalar(ll chi2)								 

 

rename perrfpc rfperpc
rename morrfpc  rfmorpc
rename prorfpc rfprocpc
rename techrfpc rftechpc


stset year, failure(death) id(agencyid)	 
stpiece, tp(1966 1978) tv(rfperpc rfmorpc rfprocpc rftechpc staf lev cre ref turn age a2ge  eco hi med spd) cluster(agencyid) robust nolog 
est store PCE_Model2																			 
esttab PCE_Model2,replace se aic bic scalar(ll chi2)
esttab PCE_Model2 using TableA29PCE_Modellfourep19661978rfwithoutlog.rtf,replace se aic bic scalar(ll chi2)								 




